<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>运维单位--公告列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/weadmin.css">
    <script type="text/javascript" src="/templates/act/process-xl.js"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<form class="layui-form searchForm" action="">
    查询:
    <div class="layui-input-inline">
        <input style="width:200px;" type="text" name="noticeTitle" placeholder="请输入关键字" autocomplete="off"
               class="layui-input">
    </div>
    <div class="layui-input-inline">
        <select name="acceptOrgType" id="acceptOrgType">
            <option value=""></option>
        </select>
    </div>
    <button class="layui-btn" lay-submit lay-filter="formDemo">查询</button>
    <button class="layui-btn" lay-submit lay-filter="formClear">清空</button>
</form>
<table class="layui-hide" id="dataList" lay-filter="dataList"></table>
<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<script>
    layui.use(['jquery','form', 'configureCom', 'configure','selectFun', 'sessionFun', 'table', 'matchDict'], function () {
        var $ = layui.jquery;
        var configure = layui.configure;
        var form = layui.form;
        var table = layui.table;
        var sessionFun = layui.sessionFun;
        var selectFun = layui.selectFun;
        var matchDict = layui.matchDict;
        var configureCom = layui.configureCom;
        configureCom.selectDataFun(configure.NOTICE_ORG_TYPE, '', '#acceptOrgType'); //接收单位
        form.render();
        var cols = [[
            {field: 'noticeTitle', title: '通知标题'},
            {field: 'createTime', title: '发布时间'},
            {field: 'acceptOrgType', title: '接受单位', templet: function (d) {
                    var arr = d.acceptOrgType.split(',');
                    for (var i = 0; i < arr.length;i++){
                        return '<p>' + (matchDict.name(arr[i],configure.NOTICE_ORG_TYPE) ||'-') + '</p>';
                    }
                }
            },
            {field: 'showStatus', title: '显示状态', toolbar: '#switchTpl'
            },
            {fixed: '', title: '操作', toolbar: '#barDemo', width: 320}
        ]];
        configureCom.tableLineBorder(configure.EXAMINATION_LIST_HTTP, {}, cols, 'dataList', 10, '', 'toolbarOrg');

    });
</script>
</body>
</html>